package org.lee.basic.exts;

/**
 * @author jackielee
 * @version 1.0
 * @description Child
 * @date 2021/4/19
 */
public class Child extends Parent {

  /**
   * 被重写
   *
   * @param name
   */
  @Override
  public void hello(String name) {
    System.out.println("I'm child, hello " + name);
  }

  /**
   * 未被重写
   *
   * @param name
   */
  public void hello2(String name) {
    System.out.println("I'm child, hello2 " + name);
  }

  public static void main(String[] args) {
    Parent p = new Child();
    p.hello("lee"); // child hello
    p.hello2("lee2"); // child hello2
  }
}
